"""
    面向对象：继承
"""

class Person:
    home = "earth"
    def __init__(self,name):
        # 实例属性
        self.name = name

    def eat(self):
        print("i like eating.......")

class YellowRace(Person):
    color = "yellow"

class WhiteRace(Person):
    color = "White"

class BlackRace(Person):
    color = "black"


zjj = YellowRace("张佳佳")
print(f"{zjj.name}是{zjj.home}人,也是{zjj.color}种人")
zjj.eat()
james = BlackRace("詹姆斯")
print(f"{james.name}是{james.home}人，也是{james.color}种人")
james.eat()


